#ifndef __GRAPH_H__
#define __GRAPH_H__

#include "widget.h"

typedef  struct rgb
{
    uint32_t b : 8;
    uint32_t g : 8;
    uint32_t r : 8;
    uint32_t a : 8;

} __attribute__((__packed__)) rgb_t;

/*! Horizontal gradient rectangle
 * \param widget: pointer to a widget
 * \param rect: coordinate for the rectangle
 * \param top_color: color at the top
 * \param bottom_color: color at the bottom
 */
void horz_gradient_rect(widget_t*,RECT*,rgb_t,rgb_t);

/*! Vertical gradient rectangle
 * \param widget: pointer to widget
 * \param rect: coordinae for the rectangle
 * \param left_color: color at the most left
 * \param right_color: color at the most right
 */
void vert_gradient_rect(widget_t*,RECT*,rgb_t,rgb_t);

/*! Solid rectangle
 * \param widget: pointer to widget
 * \param rect: coordinate for the rectangle
 * \param color: color to fill the rectangle
 */
void solid_rect(widget_t*,RECT*,rgb_t);

/*! Antialiased line
 * \param widget: point to widget to draw
 * \param x1: coordinate to the first point
 * \param y1: coordinate to the first point
 * \param x2: coordinate to the second point
 * \param y2: coordinate to the second point
 * \param color: color do draw the line
 */
void line(widget_t*,int32_t,int32_t,int32_t,int32_t,rgb_t);

#endif /* __GRAPH_H__ */

